\documentstyle{article}
\setlength{\topmargin}{0in}
\setlength{\textheight}{8.5in}
\setlength{\oddsidemargin}{0in}
\setlength{\textwidth}{6.5in}
\newcommand{\cmt}[1]{{\sf [#1]}}
\newcommand{\SEC}[1]{\subsubsection*{#1}}
\begin{document}
\begin{center}
{\bf
GDR User Documentation}\\
(last modification: 19 March 1992)
\end{center}

\SEC{Manual entry of a new graph.}
The following steps are recommended for manually entering a new
graph (Directed or undirected).
\begin{enumerate}
\item
Select {\tt CREATE VERTEX} on the panel (click left in the box labelled
{\tt CREATE VERTEX} if this is not already in reverse video).
Create the vertices of your graph by positioning the mouse
and clicking left for each vertex.
The first vertex created will be vertex 0 (usually the start vertex for
algorithm simulations).
Others will be designated with consecutive numbers
(there is currently a limit of 100 vertices).

\item
Select {\tt CREATE EDGE} on the panel.
To create an edge from vertex $i$ to vertex $j$, where $i \neq j$,
click left with the mouse on vertex $i$ (vertex $i$ will be highlighted
-- turned white -- at this point), then click left again with the
mouse on vertex $j$.
An arrow or line connecting the two should appear with an empty rectangular
label in the middle.
If the line crosses other existing vertices or edges, the diagram may
look strange; consult the section on {\bf Moving things around} if this
is a problem.
To create a loop from vertex $i$ to itself, click
twice on vertex $i$.
A message will instruct you to click two more times to indicate the
position of the loop.
The loop will then appear as a triangle, with vertex $i$ and the
mouse positions of the two additional clicks as its three points.

\item
If the edges of the graph need to be labelled (for algorithms with
weighted edges, for example),
select {\tt EDIT LABEL} on the panel.
To create or change a label, move the mouse into the appropriate rectangle
(a pencil should appear) and type the new label.

\item
If your new creation looks ok, you can save it in a file by typing {\tt
s} or selecting {\tt SAVE} in the pull-down menu (right mouse button).

\item
Now you can run the appropriate algorithm on your graph by
following the instructions beginning in paragraph~2 of {\bf Running the
algorithm for an existing graph}.
Or you can exit from the system by typing {\tt q} or selecting {\tt QUIT
GDR} from the pull-down menu.
\end{enumerate}

\SEC{Moving things around}
It is sometimes hard to avoid having edges run into vertices or labels
of other edges or even other edges themselves.
Wherever two objects coincide, they cancel each other;
for example, if two edges appear on top of each other they effectively
erase each other.
The system has built-in heuristics for handling the placement of
multiple edges between the same two vertices, but there are other cases
where edges may collide.
Careful planning can obviate some of these problems, but it is possible
to move vertices, edge labels, and edge {\em knot points}, the two kinks
in an edge that is not a straight line
(even straight-line edges have knot points, but they are hard to see).

To move any of the above objects, select {\tt MOVE} on the panel, point
the mouse to the object, press down the middle button, and hold the
middle button while dragging the mouse to the desired location.
A black dot shows the mouse position while the object is being dragged.
When a vertex is moved, all incident edges (edges into and out of the
vertex) and their labels are moved with it.
If the vertex being moved has a loop attached to it, the system will
prompt you for two additional mouse clicks to determine the new location
of the knot points on the loop.

\SEC{Deleting objects}
A vertex or an edge may be deleted by selecting {\tt DELETE} on the
panel, pointing the mouse at the vertex or edge, and clicking the left
button.
Do not delete vertex 0, since this is the start vertex, and any new
vertices added will have numbers higher than the current highest
numbered vertex.
That is, once a vertex is deleted, its number will not be reassigned to
newly created vertices.
The pull-down menu (right mouse button) also has a {\tt CLEAR} option,
which deletes the whole graph and starts from scratch.

\SEC{Running the algorithm on an existing graph.}
To read a file containing a graph, either type {\tt r} or use the
right mouse button to pull down the menu and release it while it is
pointing to the {\tt READ IN} option.
A smaller query window will appear, asking the name of the file.
Type the file name followed by {\tt [Return]}.
Use the {\tt [Delete]} button to back up over mistakes.
If the file does not exist or is unreadable, an error message will appear
in the original {\tt xterm} window
(you may have to click the title bar of that window with the left mouse
button to see the message;
this ``feature'' will be fixed in future versions;
note: the {\em title bar} of any window is the top border area
containing the name of the window --- clicking on this will bring the
window into the foreground).

After the graph appears in the window, type {\tt p} to invoke the
simulator program (or select {\tt RUN FILE} from the menu).
To start the simulation or to continue it at a breakpoint,
either click left with the mouse in the small
window labelled {\tt RESUME ?} (at the bottom right) or type {\tt q}.
When the simulation stops at any breakpoint, you may alter the graph
using any of the commands, or save the current picture in a file (using
the SAVE command).

\SEC{List of commands}

{\sl Panel options}
\begin{description}
\item[CREATE VERTEX]
Left mouse click creates a new vertex (number is one greater than most
recently created vertex, first vertex has number 0).
\item[CREATE EDGE]
Left mouse click on vertex $i$ followed by left click on vertex $j$
creates an edge from $i$ to $j$.
If $i=j$, two more clicks define knot points of loop.
\item[MOVE]
Point to vertex, edge label, or knot point, push middle mouse button and
hold until mouse points to new position.
\item[DELETE]
Left mouse click on vertex or edge deletes the vertex or edge.
\item[EDIT LABEL]
Move mouse inside rectangle representing a label to change the label;
any typed text becomes the new label ({\tt [Delete]} acts as backspace).
Left mouse click on vertex exposes the label or hides it if it's already
exposed.
\end{description}

{\sl Menu options}
\begin{description}
\item[SAVE] (or type {\tt s} or {\tt S})
Current graph is saved in a file (user is prompted for the file name and
asked to confirm the action if the file already exists).
\item[READ IN] (or type {\tt r} or {\tt R})
A graph is read from a file (user is prompted for file name).
Current graph is erased.
\item[RE-DRAW]
The window is redrawn (in case things get messed up).
\item[CLEAR]
The current graph is erased.
\item[RUN FILE] (or type {\tt p} or {\tt P})
The animation program is executed.
Whenever a window with the prompt {\tt RESUME ?} appears at the bottom
right of the screen, control returns to the user interface: the user can
edit the graph (e.g. move things around, modify labels, etc.).
The program continues execution if there is a left mouse click in the
{\tt RESUME ?} window, or a {\tt QUIT GDR} command issued.
\item[QUIT GDR] (or type {\tt q} or {\tt Q})
Exit from the GDR (stands from Graph Drawing) program, or resume
execution of the animation program if it is running.
\end{description}

Note that {\tt [Control]-C} acts as a general panic button: any of the
above commands is aborted in response to it (this does not quite work as
it should for the {\tt RUN FILE} command).
\label{last}
\end{document}
